From e737237fca45a200226167d5cec25abe19fe59fd Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 4 Sep 2007 04:13:53 +0000 Subject: [PATCH] *Only sanitize IPv6 titles for pages in user namespace. --- includes/Title.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index b41122ba64..6934264c64 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1916,9 +1916,13 @@ class Title { $this->mNamespace != NS_MAIN ) { return false; } - // Allow IPv6 to start with '::' by expanding it. - // This trims all input, but that happens anyway. - $dbkey = IP::sanitizeIP( $dbkey ); + // Allow IPv6 usernames to start with '::' by canonicalizing IPv6 titles. + // IP names are not allowed for accounts, and can only be referring to + // edits from the IP. IPv6, given '::' abbreviations and caps/lowercaps, + // there are numerous ways to present the same IP. Having sp:contribs scan + // them all is silly and having some show the edits and others not is + // inconsistent. Keep them normalized instead. + $dbkey = $this->mNamespace == NS_USER ? IP::sanitizeIP( $dbkey ) : $dbkey; // Any remaining initial :s are illegal. if ( $dbkey !== '' && ':' == $dbkey{0} ) { return false; -- 2.20.1